package com.ruoyi.dynamic.controller.crm;


import com.ruoyi.common.core.constant.constant.PathConstant;
import com.ruoyi.common.core.context.SecurityContextHolder;
import com.ruoyi.common.core.pojo.vo.BaseVO;
import com.ruoyi.common.core.result.Result;
import com.ruoyi.dynamic.model.pojo.request.crm.CrmLuckBagCheckRequest;
import com.ruoyi.dynamic.service.ILuckyBagService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


@Tag(name = "CRM-福袋相关", description = "CRM-福袋相关")
@RestController
@RequestMapping(PathConstant.CRM_PATH + "lucky-bag")
public class CrmLuckyBagController {


    private final ILuckyBagService luckyBagService;

    public CrmLuckyBagController(ILuckyBagService luckyBagService) {
        this.luckyBagService = luckyBagService;
    }

    @Operation(summary = "审核福袋", description = "审核福袋")
    @PostMapping("check")
    public BaseVO check(@RequestBody @Valid CrmLuckBagCheckRequest request) {
        return Result.successOrFail(luckyBagService.check(request));
    }


}

